package framework;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
 

public class InterceptorTest implements MethodInterceptor {

	@Override
	public Object invoke(MethodInvocation methodInvocation) throws Throwable {
		String info = methodInvocation.getMethod().getDeclaringClass() + "." + methodInvocation.getMethod().getName() + "()";
		System.out.println(info);

		try {
			Object result = methodInvocation.proceed();
			return result;
		} finally {
			System.out.println(info+" ------------------------             end");
		}
	}
}
